package com.ds.components.builders;

import com.ds.components.composite.DisplayGridBar;
import com.ds.components.bars.ElbowBar;

public class DisplayGridBarBuilder extends AbstractBuilder<DisplayGridBar>
{
	public StraightBarBuilder straightBarBuilder = new StraightBarBuilder();
	public ElbowBarBuilder    elbowBarBuilder    = new ElbowBarBuilder();
	public DisplayGridBuilder displayGridBuilder = new DisplayGridBuilder();

	@Override
	public DisplayGridBar build()
	{
		DisplayGridBar bar = new DisplayGridBar();

		bar.topElbowBar = this.elbowBarBuilder.build();
		bar.bottomElbowBar = this.elbowBarBuilder.build();
		bar.elbowPanel = this.straightBarBuilder.build();
		bar.grid = this.displayGridBuilder.build();

		bar.topElbowBar.setBarLayout( ElbowBar.TOP );
		bar.bottomElbowBar.setBarLayout( ElbowBar.BOTTOM );

		return bar;
	}
}
